/**
 * Created by camiez on 2017/3/28.
 */
import Vue from 'vue';
import vueRouter from 'vue-router';
Vue.use(vueRouter);

import vueResource from 'vue-resource';
Vue.use(vueResource);

import store from './src/vuex/store.js';

import elementUi from 'element-ui';
Vue.use(elementUi);
import './node_modules/element-ui/lib/theme-default/index.css';

import login from './src/components/login.vue';
import app from './src/components/app.vue';
import bookManager from './src/components/bookManager.vue';
import editeBook from './src/components/editeBook.vue';
import addBook from  './src/components/addBook.vue';
import adminManager from './src/components/adminManager.vue';
import userManager from './src/components/userManager.vue';
import commentManager from './src/components/commentManager.vue';
import violations from './src/components/violations.vue'
import messageBoardManager from './src/components/messageBoardManager.vue';
import announcementManager from './src/components/announcementManager.vue';
import passComment from './src/components/passComment.vue';
import unpassComment from './src/components/unpassComment.vue';
import needAddBook from './src/components/needAddBook.vue';
const router = new vueRouter({
    routes:[
        {path:'/',redirect:'/login'},
        {path:'/login',component:login},
        {path:'/app',component:app,children:[
            {path:'/app/bookManager',component:bookManager},
            {path:'/app/editeBook',component:editeBook},
            {path:'/app/addBook',component:addBook},
            {path:'/app/adminManager',component:adminManager},
            {path:'/app/userManager',component:userManager},
            {path:'/app/commentManager',component:commentManager},
            {path:'/app/messageBoardManager',component:messageBoardManager},
            {path:'/app/announcementManager',component:announcementManager},
            {path:'/app/checkViolations',component:violations},
            {path:'/app/passComment',component:passComment},
            {path:'/app/unpassComment',component:unpassComment},
            {path:'/app/needAddBook',component:needAddBook},
        ]},
    ]
})
import './src/static/css/reset.css'
import './src/static/css/index.css'
import Main from './src/components/main.vue';
new Vue({
    el:'#app',
    store,
    router,
    render:c=>c(Main)
})